
<?php 
//Takes a mysql reault that has one result and returns 
//the single peice of information from that result as a string.
function displayNameofTable($id, $table) {
	$result = selectFromDatabase(array("Name"), $table, array('id' => $id));
	$resultArray = mysql_fetch_array($result, MYSQL_ASSOC);
	echo "<a href=ViewGeneric.php?" . tableToTabeIDName($table) . "=" . $id . "&search=" . makeSearchLink($_GET) . ">". $resultArray['Name'] . "</a>";
	
	
}

?>

<?php if(!isset($_COOKIE['Helper']) && !isset($_COOKIE['Admin'])): ?>
	<?php require('./View/ModifyTubeBackEndInfo.php'); ?>
<?php endif; ?>
<table cellpadding=4>
<table>
<tr>
<td>
<table>
<tr>
<?php if(!isEmpty($line)): ?>
<td>
Cell Type:</td><td><font size=4> <? echo displayNameofTable($line['CellTypeID'], "CellType"). " "; ?></font>	</td></tr>
<tr>
<td>		
Modification:</td><td <font size=4><?php echo displayNameofTable($line['ModifiedByID'], "Modification") . " "; ?> </font></td></tr>
<tr>
<td>
Researcher: </td><td><font size=4><?php echo displayNameofTable($line['FrozenByID'], "Researcher"); ?> </font></td></tr>
<tr>
<td>
Frozen:</td><td> <font size=4><? echo ($_SERVER['PHP_SELF'] == '/LN2_Website/ModifyTube.php')? mysql2Date($line['FrozenDate']) : ""; ?></font></td></tr>
<tr>
<td>
Passage Frozen: </td> <td><font size=4><? echo $line['PassageFrozen']; ?></font></td></tr>
<tr>
<td>

Number of Cells Frozen: </td><td><font size=4><? echo $line['NumberFrozen']; ?></font></td> </tr>
<tr>
<td>
Notes: </td><td><font size=4><? echo $line['Note']; ?></font>

<?php else: ?>
<td>
Tube is Empty
<?php endif; ?>
</td></tr>
	</tr>
	<tr>
	<td>
		<?php if(isset($_COOKIE['User'])): ?>
			<input type="submit" name="clear" onClick="document.pressed='question'" value="Clear the Tube">
		<?php endif; ?>
	</td>
	</tr>
		
</table>
</td>
<td>
<?php require('./View/ShowSmallBox.php') ?>
</td>
</tr>
</table>